package zhtt;

import org.hibernate.Session;
import org.junit.After;
import org.junit.Before;

/**
 * Created by zhtt on 2017/4/14.
 */
public class JunitTestUtil {
    public Session session;

    @Before
    public void setUp(){
        session=HbnUtil.getSession();
        session.beginTransaction();
        System.out.println("……session打开……");
    }

    @After
    public void close(){
        session.getTransaction().commit();
        System.out.println("……提交……");
    }
}
